package com.lagou.socket;

/**
 * 面向接口编程
 */
public interface MiniCatService {

    /**
     * 监听某个端口
     * @param port
     * @param timeout 超时设置
     */
    public void listen(int port, int timeout) throws Exception;

    /**
     * 开始运行
     * @throws Exception
     */
    public void execute() throws Exception;

    /**
     * 关闭资源
     * @throws Exception
     */
    public void shutdown() throws Exception;
}
